﻿@using UCosmic.Www.Mvc.Areas.Establishments.Models.ManagementForms
@model EstablishmentForm
@{
    Layout = (ViewBag.NullLayout == null) ? Layout : null;
    ViewBag.Title = Model.IsNew ? "Add a new establishment" : Model.TranslatedThenOfficialName;
}
<h2>@ViewBag.Title</h2>
@using (Html.BeginForm(
    MVC.Establishments.ManagementForms.ActionNames.Put,
    MVC.Establishments.ManagementForms.Name,
    new
    {
        area = MVC.Establishments.Name, 
        httpMethod = "PUT", 
        entityId = Model.EntityId,
    }
))
{
    @Html.HttpMethodOverride(HttpVerbs.Put)
    @Html.EditorForModel()
}
@section Scripts {

    <script src="@Url.Content(Links.scripts.jquery_simplemodal_1_4_1_js)" type="text/javascript"></script>

    @if (Request.IsSecureConnection)
    {
        <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
    }
    else
    {
        <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
    }
}
